<template>
  <div>
    <custom-form
      :columns="columns"
      :rules="rules"
      v-bind="$attrs"
      v-on="listeners"
    >

    </custom-form>
  </div>

</template>

<script>
import customFromMixin from '@/utils/mixin/custom-form'

export default {
  name: 'AddForm',
  mixins: [customFromMixin],
  data() {
    return {
      rules: {},
      // 列配置
      columns: [
        { name: '标题', field: 'title', opts: { required: true, maxlength: 50 } },
        { name: '副标题', field: 'Subtitle', opts: { required: true, maxlength: 225 } },
        {
          name: '主图',
          field: 'image',
          opts: { required: false, control: 'attachment', name: 'link', pk: 'url', query: { category: 'image' }, format: 'image' },
          type: 'select_table'
        },
        { name: '状态', field: 'status', label: true, type: 'radio', opts: { required: true } },
        {
          name: '内容',
          field: 'content',
          opts: { },
          type: 'editor'
        }

        // { name: '租户', field: 'user.nickname', opts: { control: 'user', label: 'nickname' }, type: 'select_table' },
        // { name: '状态', field: 'status', label: true, type: 'radio', opts: { required: true } },
        // { name: '备注', field: 'mark', type: 'textarea', opts: { maxlength: 120 } }
      ]
    }
  },
  watch: {},
  methods: {}
}
</script>

<style scoped>

</style>
